package com.gg.user.gguser.controller;

import com.gg.user.gguser.service.GgSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author yangxinlei
 * @date 2020/4/28
 */
@RestController
@RequestMapping("/search")
public class GgSearchController {

    @Autowired
    private GgSearchService ggSearchService;

    /**
     * 搜索查询
     */
    @PostMapping("/getSearch")
    public Object getSearch(HttpServletResponse response, HttpServletRequest request, String q, Integer page, Integer pageNumber) throws Exception {
        return ggSearchService.getSearch(response, request, q, page,pageNumber);
    }


}
